package com.ssm.domain.service.impl;

import com.ssm.domain.mappers.UserMapper;
import com.ssm.domain.po.UserPo;
import com.ssm.domain.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Desc:
 * Author: manem - chenzh
 * Date: 2023/5/30 下午3:35
 */
@Service
public class UserServiceImpl implements IUserService {
    @Autowired
    private UserMapper userMapper;

    public Integer insert(UserPo userPo) {
        return userMapper.insert(userPo);
    }

    public UserPo findById(Long id) {
        return userMapper.findById(id);
    }

    public UserPo findByUsername(String username) {
        return userMapper.findByUsername(username);
    }

    public Integer update(UserPo userPo) {
        return userMapper.update(userPo);
    }

    public Integer delete(Long id) {
        return userMapper.delete(id);
    }
}
